The present invention relates to processing objects in a computer graphics illustration application.
A computer graphics illustration can be created using a computer graphics application program. The computer graphics illustration can include several objects which in turn can be arranged in one or more layers. Each object is delimited by a border and has its own color. Intersections between objects located in different layers in the computer graphics illustration define atomic regions.
The computer graphics illustration can be divided up into regions that are independent of the objects and the atomic regions. A region can include a part of an object, or several objects, depending on the size of the region. A region can further be tiled, that is, subdivided into portions (that is, tiles) that are independent of the objects or atomic regions within a given region of the computer graphics illustration. A tile has a closed boundary and can have any geometrical shape or size.
When printing an object in PostScript™ format from a graphics application such as Adobes® Illustrator, the PostScript™ printing process converts the received object data having a transparent imaging model and including several layers into a one-layer opaque model, using a technique known as planarization. The planarization technique includes steps for computing intersections between objects that are located in different layers in a computer graphics illustration to define atomic regions. Each atomic region includes a specific set of objects, each object having its own color. When all the atomic regions have been created, the atomic regions are processed one by one in order to create the final color of a given atomic region.
In a conventional planarization process, objects in an atomic region have a vector-based representation. However, when an atomic region becomes too complicated, that is, when the atomic region contains a large number of objects, the planarization process divides the atomic region into tiles, and rasterizes each tile. In a rasterized tile, the resulting color of the tile is determined on a pixel-by-pixel basis, resulting in a raster-based representation for all objects that intersect the respective tile.
Typically the planarization process does not flatten the raster-based representation forming a vector-based representation because stitching errors may occur. Normally, when a PostScript™ output is generated, each object has a vector-based representation and is painted in a particular order, the paint order. Stitching errors occur when the paint order is violated. Assume, for example, that there are two adjacent tiles. The first tile is processed and all the vector objects in the first tile are output. The second tile is processed and all the vector objects in the second tile are output. Since the tiles may share some pixels along the tile borders, some vector objects in the second tile may overwrite some vector objects in the first tile. This is a violation of the paint order.
The right hand side of FIG. 1 shows the output result when no tiles are present and conventional Postscript™ rules are applied to a source image, shown in the left hand side of FIG. 1. A pixel grid (100) includes multiple individual pixels (105). Three objects are drawn on the pixel grid (100). A light grey object (110) is drawn first, a dark grey object (115) is drawn second, and a black object (120) is drawn last. As can be seen, the borders of all the objects fall between the lines of the pixel grid (100), that is, each object fully covers some pixels and partially covers other pixels along its edges.
The right hand side of FIG. 1 shows the output after the PostScript™ overscan rules have been applied to the source objects in the left hand side of the FIG. 1. In summary, the Postscript™ overscan rules require that when several objects occupy the same pixel, the object that was drawn last will be drawn on top and occupy that entire pixel. As can be seen in the resulting output shown in the right hand side of FIG. 1, the light grey object (110) that was first drawn has been completely concealed by the dark grey object (115) and the black object (120). The resulting objects have also changed so that they completely occupy the pixels that previously were only partly occupied.
FIG. 2 shows how a stitching error may arise when tiles are applied to the objects and the objects are processed as vector based data. The left hand side of FIG. 2 shows the same objects as are shown in the left hand side of FIG. 1, but with the addition of two tiles having borders that act as clipping paths. The objects within each tile or clipping path are processed independently of surrounding tiles or objects. The objects in the left hand side in FIG. 2 are painted in the following order: clipping path (125), light grey object (110), black object (120), clipping path (130), light grey object (110), and dark grey object (115). When the PostScript™ output is generated, the objects inside the first clipping path (125) are processed first, and then the objects inside the second clipping path (130) are processed. When the light grey object inside the second clipping path (130) is processed, a row of pixels covering a part of the black object results, as shown on the right hand side in FIG. 2. This is an example of a violation of the paint order and results in a stitching error.